#include <stdio.h>
int main()
{
    int dm, nm; //dm=denominator,分母；nm=numerator，分子。
    int dm1, nm1;
    int temp;
    int mod;
    scanf("%d/%d", &nm, &dm);
    nm1 = nm;
    dm1 = dm;
    if (nm1 > dm1)
    {
        temp = dm1;
        dm1 = nm1;
        nm1 = temp;
    }
    mod = dm1 % nm1;
    while (mod != 0)
    {

        dm1 = nm1;
        nm1 = mod;
        mod = dm1 % nm1;
    }
    dm = dm / nm1;
    nm = nm / nm1;
    printf("%d/%d", nm, dm);
    return 0;
}